[Merge] Add ForkChoiceNotifier to combine fork choice updates with beacon proposers #4688
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
Based on @tbenr 's #4678. This introduces ForkChoiceNotifier which combines information from the REST API about which validators the beacon node should prepare blocks for with fork choice state updates and calls the execution engine onForkChoiceUpdated function.
The ForkChoiceNotifier implementation is made thread safe by using an EventThread which ensures ForkChoiceNotifier code runs on a single thread to avoid race conditions, but incoming events preserve ordering to ensure forkChoiceUpdated notifications are still sent in order.
The
ForkChoice
system doesn't currently deliver events to theForkChoiceNotifer
. That will be done in a follow up PR.Fixed Issue(s)
#4668
Documentation
documentation
label to this PR if updates are required.Changelog